//logs.js
var util = require('../../utils/util.js')
Page({
  data: {
    logs: [],
    uinfo:{}
  },
  onLoad: function () {
    this.setData({
      logs: (wx.getStorageSync('logs') || []).map(function (log) {
        return util.formatTime(new Date(log))
      })
    })
  },
  goTest:function(){
     console.log(this.data.uinfo);

     let _this = this;

     wx.showToast({
       title:'正在计算你的命数',
       icon:'loading',
       duration:1000
     })
     setTimeout(function(){
       console.log('res');
       wx.showModal({
         'title':'你的命数如是',
         'content':_this.data.uinfo.name + '，您的生日是：'+_this.data.uinfo.birth+' www.meichengxu.com',
         'showCancel':true,
         'cancelText':'不信',
         'confirmColor':'blue',
         'confirmText':'真灵'
       })
     },1000)
 
  },
  dataChange:function(event){
      this.data.uinfo[event.currentTarget.id] = event.detail.value;
  }
})
